import React, { useState, useEffect } from 'react';
import { servicerLog } from '@/api/login';
import { Table } from 'antd';

import { initTable } from '@/hoc';
function index(props: any) {
  console.log(props, 'props');
  const columns: any = [
    {
      title: 'ID',
      dataIndex: 'vsid',
      key: 'vsid',
      // render: (text) => <a>{text}</a>,
    },
    {
      title: '游客ID',
      dataIndex: 'visitor_id',
      key: 'visitor_id',
    },
    {
      title: '游客名称',
      dataIndex: 'visitor_name',
      key: 'visitor_name',
    },
    {
      title: 'IP',
      dataIndex: 'visitor_ip',
      key: 'visitor_ip',
    },
    {
      title: '接待客服',
      key: 'kefu_name',
      dataIndex: 'kefu_name',
    },
    {
      title: '开始时间',
      dataIndex: 'start_date',
      key: 'start_date',
    },
    {
      title: '结束时间',
      dataIndex: 'end_date',
      key: 'end_date',
    },
  ];

  return (
    <div>
      <Table
        columns={columns}
        dataSource={props.data}
        pagination={{
          // pageSize: 5,
          total: 50,
          showSizeChanger: true,
          // onShowSizeChange: onShowSizeChange,
          defaultCurrent: 1,
        }}
      />
      ;
    </div>
  );
}

export default initTable(servicerLog)(index);
